<?php

ob_start();
session_start();
$id_member = $_SESSION["id_member"];
$depart = $_SESSION["departid"];
ob_start();

include("../connect.php");

$GrpId = $_GET["grpId"];
$GrupId = $_GET["grupId"];
$TypeGrpId = $_GET["typeGrpId"];




if (!empty($GrpId)) {

    $sqlUpGra = "UPDATE `graphic` SET 
        `grpStatus` = 'finish' 
WHERE `graphic`.`grpId` = $GrpId ";

    mysql_query($sqlUpGra);


    $inFigrapic = "INSERT INTO  `graphicfinish` (
`grfId` ,
`grupId` ,
`grpId` ,
`typeGrpId` ,
`id_member` ,
`grfDate` ,
`de_id`
)
VALUES (
NULL ,  '$GrupId', '$GrpId',  '$TypeGrpId',  '$id_member',  NOW() , '$depart'
)
";
    mysql_query($inFigrapic);
} else {

     echo mysql_error();
}
if (mysql_query) {
     header("location:requiGraphicAction.php");
} else {
    echo mysql_error();
}
?>